<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>SOCKS5代理设置</title>
  <style>
    body {
      width: 100%;
      max-width: 800px;
      margin: 0 auto;
      padding: 20px;
      font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    }
    .container {
      background: white;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    h1 {
      margin-top: 0;
      color: #333;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      display: block;
      margin-bottom: 8px;
      font-weight: 500;
      color: #555;
    }
    input[type="text"],
    input[type="number"],
    input[type="password"] {
      width: 100%;
      padding: 8px 12px;
      border: 1px solid #ddd;
      border-radius: 4px;
      font-size: 14px;
      box-sizing: border-box;
    }
    input[type="number"] {
      width: 200px;
    }
    .buttons {
      display: flex;
      gap: 10px;
      justify-content: flex-end;
      margin-top: 20px;
    }
    button {
      padding: 8px 16px;
      border: none;
      border-radius: 4px;
      font-size: 14px;
      cursor: pointer;
      transition: background-color 0.2s;
    }
    #saveButton {
      background-color: #4CAF50;
      color: white;
    }
    #saveButton:hover {
      background-color: #45a049;
    }
    #resetButton {
      background-color: #f5f5f5;
      color: #333;
    }
    #resetButton:hover {
      background-color: #e8e8e8;
    }
    .status-message {
      margin-top: 20px;
      padding: 10px;
      border-radius: 4px;
      display: none;
    }
    .success {
      background-color: #E8F5E9;
      color: #2E7D32;
    }
    .error {
      background-color: #FFEBEE;
      color: #C62828;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>SOCKS5代理设置</h1>
    <form id="proxyForm">
      <div class="form-group">
        <label for="host">服务器地址</label>
        <input type="text" id="host" placeholder="例如: 127.0.0.1" required>
      </div>
      <div class="form-group">
        <label for="port">端口</label>
        <input type="number" id="port" placeholder="例如: 1080" min="1" max="65535" required>
      </div>
      <div class="form-group">
        <label for="username">用户名（可选）</label>
        <input type="text" id="username" placeholder="如果需要认证，请输入用户名">
      </div>
      <div class="form-group">
        <label for="password">密码（可选）</label>
        <input type="password" id="password" placeholder="如果需要认证，请输入密码">
      </div>
      <div class="buttons">
        <button type="button" id="resetButton">重置</button>
        <button type="submit" id="saveButton">保存</button>
      </div>
    </form>
    <div id="statusMessage" class="status-message"></div>
  </div>
  <script src="options.js"></script>
</body>
</html>